<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ include file="../baselist.jsp"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title></title>
		<script type="text/javascript" src="${ctx}/js/jquery-1.8.3.js"></script>
		<script src="${ctx}/js/highchart/highcharts.js"></script>
		<script src="${ctx}/js/highchart/highcharts-3d.js"></script>
		<script src="${ctx}/js/highchart/modules/exporting.js"></script>
		<style type="text/css">
${demo.css}
		</style>
		<script type="text/javascript">
			$(function () {
				var json = ${jsonString};
				//alert(json[0].name);
			    $('#container').highcharts({
			        chart: {
			            type: 'pie',
			            options3d: {
			                enabled: true,
			                alpha: 45,
			                beta: 0
			            }
			        },
			        title: {
			            text: '货物销售情况饼形图'
			        },
			        tooltip: {
			            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
			        },
			        plotOptions: {
			            pie: {
			                allowPointSelect: true,
			                cursor: 'pointer',
			                depth: 35,
			                dataLabels: {
			                    enabled: true,
			                    format: '{point.name}'
			                }
			            }
			        },
			        series: [{
			            type: 'pie',
			            name: '产品所占份额',
			            data: json
			        }]
			    });
			});
		</script>
	</head>
<body>
	<div id="container" style="height: 400px"></div>
</body>
</html>
